
<%@ page import="com.diseaseInformation.Management" %>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="main" />
  <g:set var="entityName" value="${message(code: 'disease.label', default: 'Management')}" />
  <title>${fieldValue(bean: managementInstance, field: "name")+"["+entityName+"]"}</title>

  <g:javascript library="prototype" />
</head>
<body>


<g:javascript>
  function getSelText()
  {
  var txt = '';
  if (window.getSelection)
  {
  txt = window.getSelection();
  }
  else if (document.getSelection)
  {
  txt = document.getSelection();
  }
  else if (document.selection)
  {
  txt = document.selection.createRange().text;
  }
  else return;
  return  txt;
  }

  function tooltipPopup(e){
  var tooltip = document.getElementById('tooltip')
  //var key = getSelText()
  tooltip.innerHTML = e.responseText
  if(tooltip.innerHTML.length>0){
  tooltip.style.visibility='visible'
  }else{
  tooltip.style.visibility='hidden'
  }
  }

  function over(type,data){
${remoteFunction(controller:"engineinformation", action:"getdata", params:"'id=' + data+'&type=' + type", onComplete:"updateover(e)")}
  }
  function updateover(e){
  var model = eval("(" + e.responseText + ")") // evaluate JSON
  var tooltip = document.getElementById('tooltip')

  tooltip.innerHTML = model.data      //set data to tooltip

  if(tooltip.innerHTML.length>0){     //set Visible
  tooltip.style.visibility='visible'
  }else{
  tooltip.style.visibility='hidden'
  }
  }
</g:javascript>


<div class="nav">
  <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
  <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
</div>
<div class="body">
  <h1>${fieldValue(bean: managementInstance, field: "name")+"["+entityName+"]"}</h1>
  <g:if test="${flash.message}">
    <div class="message">${flash.message}</div>
  </g:if>
  <div class="dialog">
    <table>
      <tbody>

        <tr class="prop">
          <td valign="top" onclick="${remoteFunction(controller:'engineinformation',action:'tooltip',onComplete:'tooltipPopup(e)',params:'\'value=\' + getSelText()')}">${managementInstance?.data}</td>
        </tr>

        <tr class="prop">
          <td valign="top" class="value"><b>Last Update</b> :${managementInstance?.lastUpdated?.encodeAsHTML()}</td>
          <td valign="top" class="value"><b>Viewer</b> :${managementInstance?.viewer?.encodeAsHTML()}</td>
        </tr>

        <tr class="prop">                           
          <td valign="top" class="value"><b:bookmark title="${managementInstance?.name}" permalink="${ipAddressUrl}/telemedicine/management/show/${managementInstance?.id}" type="addtoany"/></td>
      </tr>

      </tbody>
    </table>
    <g:render template="/layouts/tooltip" />
    <!--div id="tooltip" class="tooltip" readonly="readonly"><b>ddd</b></div-->
  </div>
  <div class="buttons">
    <g:form>
      <g:hiddenField name="id" value="${managementInstance?.id}" />
      <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
      <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
    </g:form>
  </div>
</div>
</body>
</html>
